﻿using easyVal.ValidationAttributes;

namespace easyVal.Web.Demo.Entities
{
    public class Employee
    {
        [RequiredVal(ErrorMessage = "First Name is Required")]
        [StringLengthVal(15, ErrorMessage = "Maximum Length for First Name is 15")]
        public string FirstName { get; set; }

        [StringLengthVal(100, ErrorMessage = "Maximum Length for Email is 100")]
        [Email(ErrorMessage = "Email is not Valid.")]
        public string Email { get; set; }

        [RequiredVal( ErrorMessage = "Desired Salary is required.")]
        [RangeVal(1, int.MaxValue, ErrorMessage = "Desired Salary must be between 0 and 2.14 billion")]
        public int DesiredSalary { get; set; }

        [USPhone(ErrorMessage = "Must be 10 digits. Hypens or spaces are optional.")]
        public string PhoneNumber { get; set; }
    }
}